CC:=gcc
log:=thirdparty/log/log.h thirdparty/log/log.c
log_test:test/log_test.c $(log)
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@
app_common:=app/app_common.h app/app_common.c
app_common_test:test/app_common_test.c $(app_common) $(log)
	-$(CC) $^ -o $@ -Iapp -Ithirdparty
	-./$@
	-rm $@
app_buffer:=app/app_buffer.c app/app_buffer.h
app_buffer_test:test/app_buffer_test.c $(app_buffer) $(log)
	-$(CC) $^ -o $@ -Iapp -Ithirdparty
	-./$@
	-rm $@
cJSON:=thirdparty/cJSON/cJSON.h thirdparty/cJSON/cJSON.c
cJSON_test:test/app_cJSON_test.c $(log) $(cJSON)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@
app_message:=app/app_message.c app/app_message.h
app_message_test:test/app_message_test.c $(app_message) $(log) $(cJSON)
	-$(CC) $^ -o $@ -Iapp -Ithirdparty
	-./$@
	-rm $@
app_mqtt:=app/app_mqtt.h app/app_mqtt.c
app_mqtt_test: test/app_mqtt_test.c $(app_mqtt) $(log)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp -lpaho-mqtt3c
	-./$@
	-rm $
app_pool:=app/app_pool.c app/app_pool.h
app_pool_test:test/app_pool_test.c $(app_pool) $(log)
	-$(CC) $^ -o $@ -Iapp -Ithirdparty
	-./$@
	-rm $@

#gcc -Ixxx 告诉gcc编译代码解析include时的查找路径 